<title>账户设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script type="text/javascript" src="#(assets)/js/jquery-2.2.4.min.js"></script>
<script src="#(path)/assets/plugins/layer/layer.js"></script>
#@checkToken()
<style> 
	body{font-family:"Microsoft YaHei",Arial,Helvetica,sans-serif,"宋体";}
	*{margin:0;padding:0;}
	li{list-style-type:none;}
	select,input{-webkit-appearance:none;border:0px;
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0);   
	}
</style>
<body bgcolor="#f4f5f9" style="margin:0px;">
	<div align="center" style="width:100%;">

		<div id="realname" style="margin-top:10px;height:60px;width:100%;background:#FFF;">
			<div style="width:90%;">
				<div align="left" style="float:left;color:#383838;padding:8px 0 8px 0">
					<div style="font-size:16px;color:#373737;line-height:24px;">实名认证</div>
					<div style="font-size:12px;color:#868686;line-height:20px;">完成实名认证的用户才能进行投资</div>
				</div>
				<div id="shiming" style="float:right;line-height:60px;"> </div>
			</div>
		</div>
		
		<div onclick="window.location.href='/app/page/user-changemobile'" style="height:60px;width:100%;background:#FFF;margin-top:10px;">
			<div style="width:90%;">
				<div align="left" style="float:left;color:#383838;padding:8px 0 8px 0">
					<div style="font-size:16px;color:#373737;line-height:24px;">手机号码</div>
					<div style="font-size:12px;color:#868686;line-height:20px;">手机号码是您的重要联系方式</div>
				</div>
				<div style="float:right;line-height:60px;"><span id="mobile"></span> <img style="width:18px;margin-top:21px;float:right" src="#(assets)/images/mobile/personal_jiantou2.png"></div>
			</div>
		</div>
		<div id="emails" style="height:60px;width:100%;background:#FFF;">
			<div style="width:90%;border-top:1px solid #f5f5f7">
				<div align="left" style="float:left;color:#383838;padding:8px 0 8px 0">
					<div style="font-size:16px;color:#373737;line-height:24px;">电子邮箱</div>
					<div style="font-size:12px;color:#868686;line-height:20px;">账户信息变动会通过邮件通知</div>
				</div>
				<div style="float:right;line-height:60px;"><span id="email"></span> <img style="width:18px;margin-top:21px;float:right" src="#(assets)/images/mobile/personal_jiantou2.png"></div>
			</div>
		</div>
		<div id="account"  style="height:60px;width:100%;background:#FFF;">
			<div style="width:90%;border-top:1px solid #f5f5f7">
				<div align="left" style="float:left;color:#383838;padding:8px 0 8px 0">
					<div style="font-size:16px;color:#373737;line-height:24px;">支付账户</div>
					<div style="font-size:12px;color:#868686;line-height:20px;">完成资金的充值，投资操作</div>
				</div>
				<div style="float:right;line-height:60px;"><span id="zhifu"></span> <img style="width:18px;margin-top:21px;float:right" src="#(assets)/images/mobile/personal_jiantou2.png"></div>
			</div>
		</div>
		
		<div id="questions"  style="height:60px;width:100%;background:#FFF;margin-top:10px;">
			<div style="width:90%;">
				<div align="left" style="float:left;color:#383838;padding:8px 0 8px 0">
					<div style="font-size:16px;color:#373737;line-height:24px;">安全问题</div>
					<div style="font-size:12px;color:#868686;line-height:20px;">安全保护问题，快捷找回密码</div>
				</div>
				<div style="float:right;line-height:60px;"><span id="question"> </span><img style="width:18px;margin-top:21px;float:right" src="#(assets)/images/mobile/personal_jiantou2.png"></div>
			</div>
		</div>
		<div onclick="window.location.href='/app/page/user-logpass'" style="height:60px;width:100%;background:#FFF;"> 
			<div style="width:90%;border-top:1px solid #f5f5f7">
				<div align="left" style="float:left;color:#383838;padding:8px 0 8px 0">
					<div style="font-size:16px;color:#373737;line-height:24px;">登录密码</div>
					<div style="font-size:12px;color:#868686;line-height:20px;">登录时验证登录密码，保护账户安全</div>
				</div>
				<div style="float:right;line-height:60px;"><span id="password"></span> <img style="width:18px;margin-top:21px;float:right" src="#(assets)/images/mobile/personal_jiantou2.png"></div>
			</div>
		</div>
		
		
	</div>

<script>
	var url ="#(path)/user/info?token=#(session.token??)";
	$.getJSON(url, function(datainfo) {
		console.log(datainfo);
		var datainfo = datainfo.data.info;
		if(datainfo.is_real_name_verify==0){  
			$("#shiming").html("未认证");
			$("#realname").click(function(){
				window.location.href="#(path)/app/page/user-auth";
			});
		}else{ 
			$("#shiming").html("已认证");
			$("#realname").click(function(){
				window.location.href="#(path)/app/page/user-authreal";
			});
		} 
		
		if(datainfo.is_mail_verify==0){ 
			$("#email").html("未绑定");
			$("#emails").click(function(){
				window.location.href="#(path)/app/page/user-email";
			});
		}else{
			$("#email").html("去修改");
			$("#emails").click(function(){
				window.location.href="#(path)/app/page/user-changemail";
			});
		}
		if(datainfo.is_bind_bank_card==0){
			$("#zhifu").html("立即绑定");
			$("#account").click(function(){
				if(datainfo.is_real_name_verify==0){
					window.location.href="#(path)/app/page/user-auth";
				}else if(datainfo.is_real_name_verify==0){
					window.location.href="#(path)/app/page/user-bidbank"
				}else if(datainfo.is_set_pay_password==0||datainfo.is_withhold_authority==0){
					$.getJSON("#(path)/user/setPayPassword?token=#(session.token??)",function(datainfo5){
						console.log(datainfo5); 
						url6 = datainfo5.data.url;
						window.location.href=url6;
					});
				}
			});	
		}else{
			$("#account").click(function(){
				window.location.href="#(path)/app/page/user-accountinfo";
			});
			$("#zhifu").html("已绑定");
		}
		if(datainfo.is_set_auth_question==0){
			$("#question").html("未设置");
			$("#questions").click(function(){
				window.location.href="#(path)/app/page/user-question";
			});
		}else{
			$("#question").html("去修改");
			$("#questions").click(function(){
				window.location.href="#(path)/app/page/user-questions";
			});
		}
		$("#mobile").html("去修改");
		$("#password").html("去修改");
	});
</script>



</body>